package cn.honqun.tinycms.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

@Setter
@Getter
@Schema(title = "ChangePwdVO", description = "修改密码参数")
public class ChangePwdVO {
    private Long id;

    @Schema(description = "旧密码")
    @NotEmpty(message = "旧密码是必须的")
    @Length(min = 5, max = 20, message = "密码最长20字符，最少5字符")
    private String oldPassword;

    @Schema(description = "新密码")
    @NotEmpty(message = "新密码是必须的")
    @Length(min = 5, max = 20, message = "密码最长20字符，最少5字符")
    private String newPassword;

    @Schema(description = "确认密码")
    @NotEmpty(message = "请再次输入新密码")
    @Length(min = 5, max = 20, message = "密码最长20字符，最少5字符")
    private String confirmPassword;
}
